<template>
	<view>
		<view class="newProduct">
			<u-grid
			        :border="false"
			    
					col="2"
			>
			    <u-grid-item
			            v-for="(baseListItem,baseListIndex) in newGoodsList"
			            :key="baseListIndex"
						@click="jump(baseListItem.id)"
			    >
			        <view class="image-box"><image class="_imgs"  :src="baseListItem.picUrl" mode=""></image></view>
			        <view class="newProduct-text ">
			        	<text class="newProduct-title">{{baseListItem.brief}}</text>
						<view class="newProduct-price">{{baseListItem.retailPrice}}元起</view>
			        </view>
			    </u-grid-item>
			</u-grid>
			<u-toast ref="uToast" />
		</view>
		
	</view>
</template>

<script>
	export default {
		props:['newGoodsList'],
		name:"Product",
		data() {
			return {
				
			};
		},
		methods: {
		      		//传id到详情
							jump(index){
								uni.navigateTo({
									url:'../../pages/productDetails/productDetails?id='+index
								})
							}
		      }
	}
</script>

<style lang="scss">
	.newProduct{
		margin:50rpx;
		.image-box{
			height: 200rpx;
			._imgs{
				width:200rpx;
				height: 190rpx;
			
			}
		}
	.newProduct-text{
		margin: 10px;
		.newProduct-title{
			font-size: 20rpx;
		}
		.newProduct-price{
			font-size: 20rpx;
			color: #F56723;
			text-align: center;
		}
	}	
	}
</style>
